import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
import { Article } from './Article';

@Entity({
  name: 'article_category',
})
export class ArticleCategory {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  name: string;

  @Column()
  description: string;

  @Column()
  sort: number;

  @OneToMany(() => Article, (article) => article.article_category)
  articles: Article[];
}
